//
//  YBTransferResultViewController+LayoutConstraints.m
//  Nectar
//
//  Created by famer on 2023/11/12.
//  Copyright © 2023 asance. All rights reserved.
//

#import "YBTransferResultViewController+LayoutConstraints.h"

@implementation YBTransferResultViewController (LayoutConstraints)

- (void)setLayoutConstraints{
    CGFloat width = self.view.size.width;
    CGFloat height = self.view.size.height;
    CGFloat leftMargin = 12;
    CGFloat topMargin = 12;
    
    self.navigationBar.frame = CGRectMake(0,  [UIView statusBarHeight], width, 64);
    
    self.contentView.frame = CGRectMake(0,
                                        self.navigationBar.bottom,
                                        width,
                                        self.view.height-self.navigationBar.bottom);
    
    self.resultAmountLabel.frame = CGRectMake(0,
                                              1,
                                              self.contentView.width,
                                              70);
    
    
    self.detailContentView.frame = CGRectMake(0,
                                              10+self.resultAmountLabel.bottom,
                                              self.contentView.width,
                                              0);
    
    CGFloat rowHeight = 50;
    CGFloat rowWidth = self.detailContentView.width - leftMargin*2;
    self.dateRow.frame = CGRectMake(leftMargin,
                                    0,
                                    rowWidth,
                                    rowHeight);
    
    self.statusRow.frame = CGRectMake(leftMargin,
                                      self.dateRow.bottom,
                                      rowWidth,
                                      rowHeight);
    
    self.receiverRow.frame = CGRectMake(leftMargin,
                                        self.statusRow.bottom,
                                        rowWidth,
                                        rowHeight);
    
    self.detailContentView.height = self.receiverRow.bottom;
    
    self.okButton.frame = CGRectMake(leftMargin,
                                     self.detailContentView.bottom+36,
                                     self.contentView.width-leftMargin*2,
                                     50);
}

@end
